# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Raymond Hackley <wonderfulShrineMaidenOfParadise@postmarketos.org>
pkgname=device-samsung-rossa
pkgdesc="Samsung Galaxy Core Prime LTE"
pkgver=5
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	postmarketos-base
	mkbootimg
	linux-postmarketos-qcom-msm8916
	soc-qcom-msm8916
	soc-qcom-msm8916-rproc
"
makedepends="devicepkg-dev"
source="
	deviceinfo
	modules-initfs
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
_pmb_select="soc-qcom-msm8916-rproc"

# Backwards compatibility for old device package name
_old_pkgname="device-samsung-cprime"
replaces="$_old_pkgname"
provides="$_old_pkgname=$pkgver-r$pkgrel"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="GPU/WiFi/BT/Modem/Video firmware"
	depends="firmware-qcom-adreno-a300 msm-firmware-loader firmware-samsung-rossa-wcnss-nv"
	provides="$_old_pkgname-nonfree-firmware=$pkgver-r$pkgrel"

	mkdir "$subpkgdir"
}

sha512sums="
3591d9b53a1ac6acef86636c78df246479c8b58d289b0d9c83e3dd91925381a56dae8fff4a5e507889a71c42783943febb9174b3ec50e1e80706f4e5b5e97fa1  deviceinfo
9ead03b9e3edb69b238b25e5eecd477c99f03223237a549d124903dfb56a8be02df25ea43c8c308998d2250f9e586c8fef594007f43bc426dfb2d074a6270bba  modules-initfs
"
